import React, { Component } from 'react';

class Usestateclass extends Component {
  constructor() {
    super();
    this.state = {
      count: 0
    }
  }
  setCount() {
    this.setState({
      count: this.state.count + 1
    })
  }
  render() {
    return (
      <div>
        <button onClick={()=>this.setCount()}>{this.state.count}</button>
      </div>
    );
  }
}

export default Usestateclass;
